package com.xzts.service;

import org.springframework.ai.tool.annotation.Tool;
import org.springframework.stereotype.Service;

import java.text.SimpleDateFormat;
import java.util.Date;

@Service
public class WeatherService {

    @Tool(description = "根据城市名称获取天气情况")
    public String getWeather(String cityName) {
        // Implementation
        return cityName+"阴天转多云";
    }

    @Tool(description = "根据姓名获取一段时间内得到的积分")
    public String getPoint(String name, Date startDate,Date endDate) {
        // Implementation
        return "500";
    }

    @Tool(description = "获取当前时间")
    public String getCurrentTime() {
        // Implementation
        Date date = new Date();
        String format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date);
        return format;
    }
}
